var fruit="America,Greece,Britain,Canada,China,Egypt"
var arr=fruit.split(",");
var j=0;
for(var i in fruit){
	if(fruit[i].indexOf(a)!==-1||fruit[i].indexOf(A)!=-1){
		j++;
	}
}
document.write("在以下字符中：America,Greece,Britain,Canada,China,Egypt共有"+j+"个字符包含a或A")